package com.rocsun.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.rocsun.user.param.UserRequest;
import com.rocsun.user.result.UserVO;

/**
 * @program: rocsun-scali
 * @description:
 * @author: yx.guo
 * @create: 2025-10-19 14:39
 **/
public interface UserService {

    /**
     * 分页查询
     *
     * @param request
     * @return
     */
    IPage<UserVO> page(UserRequest request);

    /**
     * 通过用户名称获取用户
     * @param userName
     * @return
     */
    UserVO getByUserName(String userName);

    /**
     * 通过id称获取用户
     * @param id
     * @return
     */
    UserVO getById(Long id);

    /**
     * 删除用户
     *
     * @param id
     * @return
     */
    boolean physicalDelete(Long id);

    /**
     * 逻辑删除
     *
     * @param id
     * @return
     */
    boolean logicDelete(Long id);

    /**
     * 更新用户
     * @param userRequest
     * @return
     */
    boolean update(UserRequest userRequest);

    /**
     * 创建用户
     *
     * @param request
     * @return
     */
    int create(UserRequest request);

    /**
     * 用户登陆
     *
     * @param request
     * @return
     */
    UserVO login(UserRequest request);

}
